package com.ruoyi.eam.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.eam.doman.EamLocation;
import com.ruoyi.eam.service.IEamLocationService;
import com.ruoyi.eam.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/lotion")
public class LocationController extends BaseController {

    @Autowired
    private IEamLocationService iEamLocationService;

    @GetMapping(value = "/{locationId}")
    public AjaxResult getInfo(@PathVariable("locationId") Long locationId)
    {
        return success(iEamLocationService.selectEamLocationByLocationId(locationId));
    }

    @GetMapping(value = "/list")
    public TableDataInfo selectEamLocationList(EamLocation eamLocation){
        return getDataTable(iEamLocationService.selectEamLocationList(eamLocation));
    }
}
